<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org">
<head>
    <meta charset="UTF-8">
    <title>关注</title>
    <link rel="stylesheet" th:href="@{/webjars/bootstrap/4.0.0/css/bootstrap.css}"/>
    <script type="text/javascript" th:src="@{/webjars/jquery/3.3.1/jquery.js}"></script>
    <script type="text/javascript" th:src="@{/webjars/bootstrap/4.0.0/js/bootstrap.js}"></script>
    <style>
        html, body {
            background-color: #F8F8FF;
        }

        th {
            cursor: pointer;
            vertical-align: middle;
            text-align: center;
        }

        td {
            vertical-align: middle;
            text-align: center;
        }
    </style>
</head>
<body>
<br/>
<h1 style="text-align: center;">关注
    <small><a th:href="@{/FansReturn}" style="text-decoration: none;">返回主界面</a></small>
</h1>
<hr>
<br/>
<div style="width:38%;margin:auto;">
    <table class="table table-striped table-hover table-bordered table-condensed">

        <tr>
            <td>学号</td>
            <td>学生</td>
            <!--<td th:text="${teaName[0]}" id = "teacher">老师</td>-->
            <td>张雪峰</td>
        </tr>

        <tr th:each="a:${associateList}">
            <td th:text="${a.stuId}"></td>
            <td th:text="${a.name}">姓名</td>
            <td th:switch="${a.teaId}">
                <a th:href="@{/attentionNo/} + ${a.stuId}">
                    <span th:case="1" class="btn btn-info btn-sm">已关注</span>
                </a>
                <a th:href="@{/attentionYes/} + ${a.stuId}">
                    <span th:case="0" class="btn btn-warning btn-sm">关注</span>
                </a>
            </td>
        </tr>
    </table>
    <td><a class="btn btn-primary btn-sm" th:href="@{/myFans}">查看粉丝</a></td>
</div>
<!--<div style="margin:auto;width:15%;">
    <div>描述:认真负责,语言生动,条理清晰,使课堂气氛比较积极热烈</div>
    <div>
        <btn class="btn btn-secondary prev">上一位</btn>
        <btn class="btn btn-secondary next">下一位</btn>
    </div>
</div>-->

<script>
    $(".prev").click(function () {
        alert('上一位');
        $("#teacher").innerHTML = "123";
        //location.reload();//刷新
    });
    $(".next").click(function () {
        alert('下一位');
        $("#teacher").innerHTML = "456";
    });
</script>
</body>
</html>